#include "Global.h"

World* Global::world;
Camera* Global::camera;
Player* Global::player;
sf::RenderWindow* Global::window;

//Global class for united settings.
World* Global::getWorld() {
    return world;
}

void Global::setWorld(World* worldParam) {
    world = worldParam;
}

Camera* Global::getCamera() {
    return camera;
}

void Global::setCamera(Camera* cameraParam) {
    camera = cameraParam;
}

Player* Global::getPlayer() {
    return player;
}

void Global::setPlayer(Player* playerParam) {
    player = playerParam;
}

sf::RenderWindow* Global::getWindow() {
    return window;
}

void Global::setWindow(sf::RenderWindow* windowParam) {
    window = windowParam;
}

float Global::randomFloat(float min, float max) {
    return ((float(rand()) / float(RAND_MAX)) * (max - min)) + min;
}
